package com.senthink.gl.business.auth;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * Created by lenovo on 2017/11/23.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserDetailRequest {

    /**
     * 用户唯一id
     */
    private String uid;

    /**
     * 姓名
     */
    @NotBlank(message = "{user.name.notBlank}")
    @Size(min = 1, max = 20, message = "{user.name.size}")
    private String name;

    /**
     * 账号
     */
    @NotBlank(message = "{user.account.notBlank}")
    @Size(min = 1, max = 60, message = "{user.account.size}")
    private String account;

    /**
     * 手机号
     */
    @NotBlank(message = "{user.mobile.notBlank}")
    @Pattern(regexp = "^(13[0-9]|14[5|7]|15[0-9]|18[0-9])\\d{8}$", message = "{user.mobile.pattern}")
    private String mobile;


    /**
     * 角色
     */
    @NotBlank(message = "{user.role.notBlank}")
    private String role;

    /**
     * 备注
     */
    private String remarks;
}
